package cn.analysis.project.mapper;

import cn.analysis.project.domain.CivilCode;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.apache.ibatis.annotations.Select;
import org.springframework.stereotype.Repository;

import java.util.List;

/** 行政区划 持久层 */
@Repository
public interface CivilCodeMapper extends BaseMapper<CivilCode> {

    /** 查看所有下级对应的civilcode */
    @Select(value = "select code, name from c_city where PCODE=#{code}")
    List<CivilCode> selectCivilCodesByCode(String code);

//    /** 通过中文名匹配civilcode */
//    @Select(value = "select code, name from c_city where name like #{name}")
//    List<CivilCode> selectCodeByName(String name);
}
